<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
session_start();
ob_start();
include("../config.php");
$username=$_POST['username'];
$password=$_POST['password'];
$sl="select * from qldl_tai_khoan where ten_dang_nhap='".$username."'";
$kq=mysql_query($sl);
$row=mysql_fetch_array($kq);
if($row['MAT_KHAU']==$password)
{ /*$d=mysql_fetch_array($kq);
echo "Chao ban ".$d['HoTen'];*/
 
$_SESSION['username']=$username;
$_SESSION['password']=$password;
header("location:../index.php");
}
else
{
echo "<script>alert('Tài khoản hoặc mật khẩu sai');</script>";
          echo"<meta http-equiv='refresh' content='0;url=dangnhap.php'>";
		  }
?>